home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_h.lzh / intuition / classusr.h < prev    next >
C/C++ Source or Header  |  1991-03-14  |  4KB  |  131 lines

  1. #ifndef    INTUITION_CLASSUSR_H
  2. #define INTUITION_CLASSUSR_H    1
  3. /*
  4. **  $Filename: intuition/classusr.h $
  5. **  $Release: 2.04 $
  6. **  $Revision: 36.1 $
  7. **  $Date: 90/11/01 $
  8. **
  9. **  For application users of Intuition object classes
  10. **
  11. **  (C) Copyright 1985,1986,1987,1988,1989,1990 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15.  
  16. #ifndef UTILITY_HOOKS_H
  17. #include <utility/hooks.h>
  18. #endif
  19.  
  20. /*** User visible handles on objects, classes, messages ***/
  21. typedef ULONG    Object;        /* abstract handle */
  22.  
  23. typedef    UBYTE    *ClassID;
  24.  
  25. /* you can use this type to point to a "generic" message,
  26.  * in the object-oriented programming parlance.  Based on
  27.  * the value of 'MethodID', you dispatch to processing
  28.  * for the various message types.  The meaningful parameter
  29.  * packet structure definitions are defined below.
  30.  */
  31. typedef struct {
  32.     ULONG MethodID;
  33.     /* method-specific data follows, some examples below */
  34. }        *Msg;
  35.  
  36. /*
  37.  * Class id strings for Intuition classes.
  38.  * There's no real reason to use the uppercase constants
  39.  * over the lowercase strings, but this makes a good place
  40.  * to list the names of the built-in classes.
  41.  */
  42. #define ROOTCLASS    "rootclass"        /* classusr.h    */
  43. #define IMAGECLASS    "imageclass"        /* imageclass.h    */
  44. #define FRAMEICLASS    "frameiclass"
  45. #define SYSICLASS    "sysiclass"
  46. #define FILLRECTCLASS    "fillrectclass"
  47. #define GADGETCLASS    "gadgetclass"        /* gadgetclass.h */
  48. #define PROPGCLASS    "propgclass"
  49. #define STRGCLASS    "strgclass"
  50. #define BUTTONGCLASS    "buttongclass"
  51. #define FRBUTTONCLASS    "frbuttonclass"
  52. #define GROUPGCLASS    "groupgclass"
  53. #define ICCLASS        "icclass"        /* icclass.h    */
  54. #define MODELCLASS    "modelclass"
  55.  
  56.  
  57. /* Dispatched method ID's
  58.  * NOTE: Applications should use Intuition entry points, not direct
  59.  * DoMethod() calls, for NewObject, DisposeObject, SetAttrs,
  60.  * SetGadgetAttrs, and GetAttr.
  61.  */
  62.  
  63. #define OM_Dummy    (0x100)
  64. #define OM_NEW        (0x101)    /* 'object' parameter is "true class"    */
  65. #define OM_DISPOSE    (0x102)    /* delete self (no parameters)        */
  66. #define OM_SET        (0x103)    /* set attributes (in tag list)        */
  67. #define OM_GET        (0x104)    /* return single attribute value    */
  68. #define OM_ADDTAIL    (0x105)    /* add self to a List (let root do it)    */
  69. #define OM_REMOVE    (0x106)    /* remove self from list        */
  70. #define OM_NOTIFY    (0x107)    /* send to self: notify dependents    */
  71. #define OM_UPDATE    (0x108)    /* notification message from somebody    */
  72. #define OM_ADDMEMBER    (0x109)    /* used by various classes with lists    */
  73. #define OM_REMMEMBER    (0x10A)    /* used by various classes with lists    */
  74.  
  75. /* Parameter "Messages" passed to methods    */
  76.  
  77. /* OM_NEW and OM_SET    */
  78. struct opSet {
  79.     ULONG        MethodID;
  80.     struct TagItem    *ops_AttrList;    /* new attributes    */
  81.     struct GadgetInfo    *ops_GInfo;    /* always there for gadgets,
  82.                      * when SetGadgetAttrs() is used,
  83.                      * but will be NULL for OM_NEW
  84.                      */
  85. };
  86.  
  87. /* OM_NOTIFY, and OM_UPDATE    */
  88. struct opUpdate {
  89.     ULONG        MethodID;
  90.     struct TagItem    *opu_AttrList;    /* new attributes    */
  91.     struct GadgetInfo    *opu_GInfo;    /* non-NULL when SetGadgetAttrs or
  92.                      * notification resulting from gadget
  93.                      * input occurs.
  94.                      */
  95.     ULONG        opu_Flags;    /* defined below    */
  96. };
  97.  
  98. /* this flag means that the update message is being issued from
  99.  * something like an active gadget, a la GACT_FOLLOWMOUSE.  When
  100.  * the gadget goes inactive, it will issue a final update
  101.  * message with this bit cleared.  Examples of use are for
  102.  * GACT_FOLLOWMOUSE equivalents for propgadclass, and repeat strobes
  103.  * for buttons.
  104.  */
  105. #define OPUF_INTERIM    (1<<0)
  106.  
  107. /* OM_GET    */
  108. struct opGet {
  109.     ULONG        MethodID;
  110.     ULONG        opg_AttrID;
  111.     ULONG        *opg_Storage;    /* may be other types, but "int"
  112.                      * types are all ULONG
  113.                      */
  114. };
  115.  
  116. /* OM_ADDTAIL    */
  117. struct opAddTail {
  118.     ULONG        MethodID;
  119.     struct List        *opat_List;
  120. };
  121.  
  122. /* OM_ADDMEMBER, OM_REMMEMBER    */
  123. #define  opAddMember opMember
  124. struct opMember {
  125.     ULONG        MethodID;
  126.     Object        *opam_Object;
  127. };
  128.  
  129.  
  130. #endif
  131.